﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GDev.PopupBox;

namespace SilverlightApplication1
{
	public partial class MyControl : UserControl
	{
		public MyControl()
		{
			// 需要初始化变量
			InitializeComponent();
		}

        private void Close_Click(object sender, RoutedEventArgs e)
        {
            FrameworkElement parent = (FrameworkElement)((FrameworkElement)sender).Parent;
            parent = (FrameworkElement)parent.Parent;
            parent = (FrameworkElement)parent.Parent;
            IPopupBox box = (IPopupBox)parent.Parent;
            box.Close();
        }
	}
}